﻿using System;

namespace BONSAI.Admin.Mode
{
    public partial class SwithMode : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadStart();
        }
        void LoadStart()
        {
            if (Session["aaa"] != null)
            {
                lbuser.Text = "Chào " + "<strong>" + Session["aaa"].ToString() + "!</strong>";
                btLogIn.Visible = false;
                btloguot.Visible = true;
            }
            else
            {
                if (Session["aab"] != null)
                {
                    lbuser.Text = "Chào " + "<strong>" + Session["aab"].ToString() + "!</strong>";
                    btLogIn.Visible = false;
                    btloguot.Visible = true;
                }
                else
                {
                    btLogIn.Visible = true;
                    btloguot.Visible = false;
                }
            }
        }
        protected void btloguot_Click(object sender, EventArgs e)
        {
            Session["aaa"] = null;
            Session["aab"] = null;
            Response.Redirect("LogIn.aspx");

        }
    }
}